﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NHibernate;
using NHibernate.Criterion;
using CondominioG1.Dominio;


namespace CondominioG1.Persistencia.NHibernate
{
     public class ResidenteDAO : BaseDAO<Residente, String>
    {
        public ICollection<Residente> ListaResidente()
        {
            using (ISession sesion = NHibernateHelper.AbrirSesion())
            {
                ICollection<Residente> resultado = sesion
                        .CreateCriteria(typeof(Residente))
                        //.Add(Restrictions.Eq("Tipo", tipo))
                        .List<Residente>();
                return resultado;
            }
        }

    }
}
